//---------------------------------------------------------------------------

#ifndef WorkerThreadH
#define WorkerThreadH
//---------------------------------------------------------------------------
#include <QThread>

#include "PubDefine.h"
//---------------------------------------------------------------------------

class TWorkerThread : public QThread
{
Q_OBJECT
signals:
  void OnStartCat();
  void ShowError(const QString&);
  void CatchPACKET(nodedata*);
  void OpenDevice();
private:

  static nodedata* m_node;
  void SetName();
  
public slots:
  void DoWatch();  
public:
  TWorkerThread();
  void run();
  void StopCap();
  static void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data);  
};
//---------------------------------------------------------------------------

#endif
